/*
 * N900DataInfo.h
 *
 *  Created on: Aug 19, 2016
 *      Author: ubuntu
 */

#ifndef N900_N900DATAINFO_H_
#define N900_N900DATAINFO_H_

#include "../DataInfo.h"
#include "N900Parse.h"
#include "N900DevStatus.h"

class N900DataInfo : public DataInfo {
public:
	N900DataInfo();
	virtual ~N900DataInfo();

	virtual bool parse(unsigned char *buf, size_t len, int add_head, int add_tail);

	virtual void debugInfo();
	virtual unsigned int getObdid();
	virtual void setObdid(unsigned int obdid);
	virtual int  sendBuf(unsigned char *dst, const unsigned char *src, size_t len, N900DevStatus *);
	virtual void writelog(const char *path);

protected:
	virtual string parseSection(int id);
	virtual string parseDriveActive(int id);
	virtual void locallog();

private:
	struct n900_msg m_msg;
	unsigned char *m_pbuf;
	size_t m_len;
};

#endif /* N900_N900DATAINFO_H_ */
